<my-content-header [firstName]="firstName" [secondName]="secondName"></my-content-header>
<!-- Main content -->
<section class="content">
  <div class="row">
    <div class="col-xs-12">
      <div class="box">
        <div class="box-header">
          <h3 class="box-title">用户信息</h3>

          <div class="box-tools">
            <div class="input-group input-group-sm" style="width: 150px;">
              <input type="text" name="table_search" class="form-control pull-right" placeholder="Search">

              <div class="input-group-btn">
                <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
              </div>
            </div>
          </div>
        </div>
        <!-- /.box-header -->
        <div class="box-body table-responsive no-padding">
          <table class="table table-hover">
            <tr>
              <th>ID标识</th>
              <th>用户名</th>
              <th>姓名</th>
              <th>性别</th>
              <th>手机号</th>
              <th>邮箱</th>
              <th>地址</th>
              <th>操作</th>
            </tr>
            <tr *ngFor="let user of userList">
              <td>{{user.id}}</td>
              <td>{{user.userId}}</td>
              <td>{{user.userName}}</td>
              <td>{{user.sex==1?'女':user.sex==2?'男':'保密'}}</td>
              <td>{{user.phoneNum}}</td>
              <td>{{user.email}}</td>
              <td>{{user.address}}</td>
              <td>
                <span class="label label-success" (click)="edit(user.id)"><i class="fa fa-fw fa-edit"></i></span>
                <span class="label label-danger" (click)="delete(user.id)"><i class="fa fa-fw fa-times"></i></span>
              </td>
            </tr>
            <tr>
              <td colspan="8">
                <form class="form-inline" style="float:right;">
                  <div class="form-group">
                    <my-pagination   [disabled]="disabled" [totalItems]="totalItems"
                                     [itemsPerPage]="pageSize"
                                     (pageChanged)="pageChanged($event)"
                                     (numPages)="numPages($event)"></my-pagination>
                  </div>
                </form>
              </td>
            </tr>
          </table>
        </div>
        <!-- /.box-body -->
      </div>
      <!-- /.box -->
    </div>
  </div>
</section>

